import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
import Music from './components/Music.vue'
import Login from './components/Login.vue'
import HotMusic from "@/components/HotMusic";

// 所有install的模块都需要Vue.use
Vue.use(Router)

const router = new Router({
    // 配置路径的数组
    routes: [
        {
            path: '/',
            component: HotMusic
        },
        {
            path: '/helloworld',
            component: HelloWorld
        },
        {
            path: '/music',
            component: Music
        },
        {
            path: '/login',
            component: Login
        }
    ]
})

export default router

